-
Notifications
You must be signed in to change notification settings - Fork 64
Legends for Vector Layers #880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Integration tests report: appsharing.space |
| } finally { | ||
| setIsLoading(false); | ||
| } | ||
| }, [layerId, model]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the dependencies include the whole model, or just the piece of the model we care about listening to? Maybe we're firing this hook too much, or not at all because the reference isn't changing but deeply nested values are changing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am now using model awareness to update legends - which is why I need model.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I'll leave some time to @mfisher87 for having another look if he wants
|
Quick drive-by before another meeting, I'll look more at the code later: I think categorized and graduated are reversed. I'd like to see a gradient for graduated symbology, and swatches for categorized, since one color applies to one value (or, ideally, a range of values #902) with categorized symbology. And for graduated, is it correct to say that, e.g. for earthquakes, 3.33-4.13 are exactly one color? If I remember correctly, we use linear interpolation between the classes, and if not, we should! The problem for categorized is that the number of swatches can get huge with many unique values, but that's not an issue with the legend, that's an issue with the user's choice to use catetegorized symbology and/or our implementation of it.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Let's get this in and open an issue for the heatmap case
|
Beautiful :) |
* legends wip * lint * categorised working * style fix * don't fire too often * do something * rework * style fix * horizontal colorbar * not needed * not needed * lint * simplify hook * property label * conditionally render legend * lint * swamps for categorised and gradient for graduated * max height and overflow for categorised

Description
Simple Symbol:
Graduated:
Categorised:
Checklist
Resolves #XXX.Failing lint checks can be resolved with:
pre-commit run --all-filesjlpm run lint📚 Documentation preview: https://jupytergis--880.org.readthedocs.build/en/880/
💡 JupyterLite preview: https://jupytergis--880.org.readthedocs.build/en/880/lite